package cate.common.table.pvp.gradepvp.sheet;

import cate.common.table.ESheet;
import cate.common.table.pvp.gradepvp.row.GradePvpRewardRow;

public class GradePvpRewardSheet extends ESheet<GradePvpRewardRow> {
    @Override
    public String getSheetName() {
        return "段位奖励";
    }


    public GradePvpRewardRow getRowByStar(int star) {
        if (star < 0) {
            return null;
        }
        GradePvpRewardRow tmpRow = null;
        for (GradePvpRewardRow row : this.getList()) {
            if (star >= row.star) {
                tmpRow = row;
            } else {
                break;
            }
        }
        return tmpRow;
    }

    public GradePvpRewardRow getNextRowByStar(int star) {
        if (star < 0) {
            return null;
        }
        GradePvpRewardRow tmpRow = null;
        for (GradePvpRewardRow row : this.getList()) {
            if (star < row.star) {
                return row;
            }
        }
        return tmpRow;
    }
}
